#include <cstdio>

int main( )
{
    int t;
    double u, v, w, l;
    scanf("%d", &t);
    while ( t-- )
    {
        scanf("%lf%lf%lf%lf", &u, &v, &w, &l);
        printf("%.3lf\n", l / ( u + v ) * w);
    }
    return 0;
}
